import request from '@/utils/request'

// 查询充电桩信息列表
export function listStake(query) {
  return request({
    url: '/business/equipment/list',
    method: 'get',
    params: query
  })
}

// 查询充电桩信息详细
export function getStake(equipmentId) {
  return request({
    url: '/business/equipment/getInfoById/' + equipmentId,
    method: 'get'
  })
}

// 新增充电桩信息
export function addStake(data) {
  return request({
    url: '/business/equipment/add',
    method: 'post',
    data: data
  })
}

// 修改充电桩信息
export function updateStake(data) {
  return request({
    url: '/business/equipment/edit',
    method: 'put',
    data: data
  })
}

// 删除充电桩信息
export function delStake(equipmentId) {
  return request({
    url: '/business/equipment/remove/' + equipmentId,
    method: 'delete'
  })
}
